package com.seamtop.cuber.service.impl;

import com.seamtop.cuber.common.entriy.CuberMenu;
import com.seamtop.cuber.dao.MenuDao;
import com.seamtop.cuber.service.CuberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * Created by zongjunfeng on 2015/11/3.
 */
@Service
public class CuberServiceImpl implements CuberService {

    @Autowired
    private MenuDao menuDao;

    public void addMenu(){
        System.out.println("add menu:   ");
        CuberMenu cuberMenu = new CuberMenu();
        cuberMenu.setMenuOrder(2);
        cuberMenu.setOperatorDate(new Date());
        cuberMenu.setMenuLevel(1);
        cuberMenu.setMenuLink("link haha");
        cuberMenu.setMenuName("name");
        cuberMenu.setMenuPid(0);
        cuberMenu.setMenuIcon("icon");
        menuDao.addMenu(cuberMenu);
    }
}
